package com.cloud.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author: ZhangKaiQiang
 * @date: 2021/4/15
 * @time: 17:30
 **/
@ConfigurationProperties(prefix = "redisson.lock")
public class RedissonConfigProperties {


    /**
     * Redis地址
     */
    private String address;


    /**
     * 选择的数据库
     */
    private Integer dataBase;

    /**
     * redis 连接密码
     */
    private String password;


    /**
     * Redis服务部署方式
     * 单台服务器
     * 集群
     * 主从
     * 哨兵
     */
    private String serverType;


    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getDataBase() {
        return dataBase;
    }

    public void setDataBase(Integer dataBase) {
        this.dataBase = dataBase;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getServerType() {
        return serverType;
    }

    public void setServerType(String serverType) {
        this.serverType = serverType;
    }

    @Override
    public String toString() {
        return "RedissonConfigProperties{" +
                "address='" + address + '\'' +
                ", dataBase=" + dataBase +
                ", password='" + password + '\'' +
                ", serverType='" + serverType + '\'' +
                '}';
    }
}
